package com.myself.community.dao;

import com.myself.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    
    @Select("select * from user where id = #{id}; ")
    User selectById(int id);//根据id查询用户

    User selectByName(String username);//根据名称查询用户

    User selectByEmail(String email);//根据邮件查询用户

    int insertUser(User user);//新增用户

    int updateStatus(int id, int status);//更新用户状态

    int updateHeader(int id, String headerUrl);//更新头像

    int updatePassword(int id, String password);//更新密码
}
